1. The Field of the Invention
The present invention relates to computing technology; and more specifically, to mechanisms for integrating and executing a sequence of tasks with automated global condition checking to avoid unnecessarily attempting to execute the sequence if the sequence cannot be completed, and with automated compensation if the sequence is attempted but cannot be completed.
2. Background and Related Art
Computing technology has transformed the way we work and play. Computing systems now take a wide variety of forms including desktop computers, laptop computers, tablet PCs, Personal Digital Assistants (PDAs), household devices and the like. In its most basic form, a computing system includes system memory and one or more processors. Software in the system memory may be executed by the processor to direct the other hardware of the computing system to perform desired functions.
Many software applications must have reliable access to accurate data in order to function properly. Applications that use data stored in a non-transactional data store can suffer from inherent reliability problems because incomplete changes made to the data in the data store may result in loss in data, or relational integrity of the data. Such incomplete changes may have been made when a sequence of actions ends unexpectedly prior to completion. In a transactional data store, the sequence of actions may simply be rolled back to its initial state as though the sequence of actions never began, thereby ensuring data integrity. A non-transactional data store does not provide this option.
A common solution to this problem is a Compensating Resource Manager (CRM), which controls and monitors the sequence of components that perform the actions. The action execution is usually done in two phases. In the first phase, the CRM instructs all participating components to acquire their resources. In the second phase, the CRM instructs the components to commit the changes. If the components were to fail, the CRM issues a sequence of compensating actions to undo the incomplete changes.
The CRM is able to recover the initial data as it existed prior to the sequence of actions. However, the CRM may waste processing resources since it does not detect whether or not the sequence of actions has a logical flaw that would necessarily cause the sequence of actions to fail. Instead, the CRM causes the sequence of actions to commence, regardless of the futility of doing so, until the execution actually fails due to the logical flaw. For example, a sequence that consists of Delete(x), followed by Copy(x) will necessarily fail, because the parameter “x” will not exist at the time the method Copy(x) is initiated. Therefore, Copy(x) (and the action sequence) must necessarily fail.
Accordingly, what would be advantageous are mechanisms that permit logical flaws in a task or a sequence of tasks to be detected without actually exercising futility in commencing the sequence of tasks. It would further be desirable if such a mechanism provided a way to roll back any changes should the sequence of tasks regarding of such global precondition checking.